package com.rc.saas.tenant.service.pay;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.mapper.pay.TenantPaymentActivityMapper;
import com.rc.saas.tenant.model.msg.TenantNotice;
import com.rc.saas.tenant.model.pay.TenantPaymentActivity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/9/10
 */
@Service
public class TenantPaymentActivityServiceImpl implements TenantPaymentActivityService {

    @Autowired
    private TenantPaymentActivityMapper tenantPaymentActivityMapper;

    @Override
    public TenantPaymentActivityMapper getMapper() {
        return tenantPaymentActivityMapper;
    }

    @Override
    public PageInfo<TenantPaymentActivity> listPageTenantPaymentActivity(BaseSearch baseSearch, String remark) {
        PageHelper.startPage(baseSearch.getOffset(), baseSearch.getLimit());
        List<TenantPaymentActivity> tenantPaymentActivities = tenantPaymentActivityMapper.listPageTenantPaymentActivity(baseSearch.getTenantCode(),remark);
        return new PageInfo<TenantPaymentActivity>(tenantPaymentActivities);
    }
}
